<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" errorPage="/error.jsp" isELIgnored="false" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>
<%@ taglib uri="http://atleap.blandware.com/taglib" prefix="atleap" %>
<html:xhtml />

<atleap:constants className="com.blandware.atleap.webapp.util.news.NewsModuleWebConstants" var="NEWS_ITEMS_COLLECTION_KEY" />
<bean:size id="newsItemsCollectionSize" collection="${requestScope[pageScope.NEWS_ITEMS_COLLECTION_KEY]}" />
<c:if test="${newsItemsCollectionSize> 0}">
	<h3>
		<atleap:message key="news.item.list" />
	</h3>
</c:if>
<table cellpadding="0" cellspacing="0" border="0" class="tableView">
	<atleap:iterator var="newsItem" items="${requestScope[pageScope.NEWS_ITEMS_COLLECTION_KEY]}">
		<tr>
			<th align="left">
				<atleap:formatDate value="${newsItem.publicationDate}" />&nbsp;&nbsp;<atleap:fieldValue valueMap="${newsItem.title}" complexSearch="true" />
			</th>
		</tr>
		<tr>
			<td>
				<atleap:edit action="/news/callUpdateItem?id=${newsItem.id}">
					<div>
						<atleap:fieldValue valueMap="${newsItem.annotation}" complexSearch="true" filter="false" />
					</div>
					<div>
						<atleap:message key="news.buttons.moreInfo" var="moreInfoMsg"/>
						<a href="${ctxPath}${newsItem.uri}" title="${moreInfoMsg}">
							${moreInfoMsg}
						</a>
					</div>
				</atleap:edit>
			</td>
		</tr>
	</atleap:iterator>
</table>
<c:if test="${newsItemsCollectionSize> 0}">
	<atleap:link action="news/showArchive"><atleap:message key="news.archive" /></atleap:link>
</c:if>


